<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script type="text/javascript">
	$(function() {
		var $grid = $('#set_dept');
		var $baseUrl = 'sys/dept';
		$grid.treegrid({
			border : false,
			singleSelect : false,
			url : $baseUrl + '/treeGrid?sort=sort,asc',
			onAjaxSuccess : function(data) {
				$(this).treegrid('unselectAll').treegrid('selectUrl', {
					url : '${param.action}/selected?joinIds=${param.id}'
				});
			},
			columns : [ [ $.fields.dept.checkbox('deptIds', false), $.fields.treeField, $.fields.description, $.fields.createTime, $.fields.lastModifyTime, $.fields.status ] ],
			toolbar : [ $.crudgrid.buttons.refresh, '-' ],
			filter : {
				prompt : '名称',
				rules : [ {
					field : 'name',
					op : 'pinyinContains'
				} ]
			}
		}).treegrid('filter.init');
	});
</script>
<form action="${param.action}" method="post" class="easyui-panel" data-options="fit:true,border:false">
	<input name="id" value="${param.id}" type="hidden" />
	<table id="set_dept" style="width: 100%, height:100%;"></table>
	<input type="hidden" name="_dontcare" value="_dontcare"/>
</form>
